VT-d: fix deassign of device with RMRR
authorJan Beulich <jbeulich@suse.com>
Fri, 1 Oct 2021 13:05:42 +0000 (15:05 +0200)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 5 Oct 2021 18:56:16 +0000 (19:56 +0100)
commit192aaf7e146c0b41dbdd35ccdb13eb33ced13633
tree591cda9125694a8599822b355f61e7c9b945168e
parentd6bdad32cbb5dfbc68fac32078cc5882071c4f1d
VT-d: fix deassign of device with RMRR

Ignoring a specific error code here was not meant to short circuit
deassign to _just_ the unmapping of RMRRs. This bug was previously
hidden by the bogus (potentially indefinite) looping in
pci_release_devices(), until f591755823a7 ("IOMMU/PCI: don't let domain
cleanup continue when device de-assignment failed") fixed that loop.

This is CVE-2021-28702 / XSA-386.

Fixes: 8b99f4400b69 ("VT-d: fix RMRR related error handling")
Reported-by: Ivan Kardykov <kardykov@tabit.pro>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Tested-by: Ivan Kardykov <kardykov@tabit.pro>
xen/drivers/passthrough/vtd/iommu.c